package NICE_CORE
import org.scalatest._
import chisel3._
import chisel3.experimental.BundleLiterals._
import chiseltest._

class test_cim_mvm extends FlatSpec with ChiselScalatestTester with Matchers {
  behavior of "cim_mvm"
  it should "do something" in{
    test(new cim_mvm){c=>
      c.io.start.poke(0.B)
      c.io.rcil.row_index.poke(0.U)
      c.io.rcil.row_length.poke(4.U)
      c.io.rcil.col_index.poke(0.U)
      c.io.rcil.col_length.poke(2.U)
      c.io.push_buf.poke("b0".U)
      c.clock.step(3)
      c.io.start.poke(1.B)
      c.clock.step(6)
      c.io.rcil.row_index.poke(0.U)
      c.io.rcil.row_length.poke(3.U)
      c.io.push_buf.poke("b01010101".U)
      c.clock.step(6)
      c.io.rcil.row_index.poke(0.U)
      c.io.rcil.row_length.poke(2.U)
      c.io.push_buf.poke("b10101010".U)
      c.clock.step(6)
      c.io.rcil.row_index.poke(0.U)
      c.io.rcil.row_length.poke(1.U)
      c.io.push_buf.poke("b01111001".U)
      c.clock.step(6)
      c.io.rcil.row_index.poke(0.U)
      c.io.rcil.row_length.poke(0.U)
      c.io.rcil.col_length.poke(1.U)
      c.io.push_buf.poke("b01010101".U)
      c.clock.step(6)
      c.io.rcil.col_length.poke(0.U)
      c.io.push_buf.poke("b01010101".U)
      c.clock.step(6)
    }
  }
}
